<div class="row">
<div class="col-8">
<form onsubmit="return false;" id="userForm" action="#(action)" method="post">
	#if(user.id??)
		<input type="hidden" name="user.id" value="#(user.id)" />
	#end
	<input type="hidden" name="user.avatar" id="userAvatarInput" value="#(user.avatar??)" class="form-control"/>
	<fieldset class="form-page-fieldset">
	<legend>基础配置信息</legend>
	<div class="form-group row">
		<label class="offset-1 col-2 col-form-label">姓名</label>
		<div class="col-8">
			<input type="text" autocomplete="off"  class="form-control" data-rule="required" placeholder="请输入用户姓名" data-tips="请输入用户姓名" maxlength="20" name="user.name" value="#(user.name??)">
		</div>
	</div>
	<div class="form-group row">
		<label class="offset-1 col-2 col-form-label">性别</label>
		<div class="col-8">
		<select class="form-control" data-rule="required"  data-tips="请选择性别" data-url="admin/user/sexSelect"  name="user.sex" data-autoload data-text="=请选择=" data-value="" data-select="#(user.sex??)"></select>
		</div>
	</div>
	<div class="form-group row">
		<label class="offset-1 col-2 col-form-label">手机号</label>
		<div class="col-8">
			<input type="text" autocomplete="off"  class="form-control"  placeholder="请输入用户手机号"  maxlength="20" name="user.phone" value="#(user.phone??)">
		</div>
	</div>
	</fieldset>
	<fieldset class="form-page-fieldset">
	<legend>登录账号、密码、角色配置</legend>
	<div class="form-group row">
		<label class="offset-1 col-2 col-form-label">用户名</label>
		<div class="col-8">
			<input type="text" autocomplete="off"  class="form-control" data-rule="required" placeholder="请输入登录用户名" data-tips="请输入登录用户名" maxlength="20" name="user.username" value="#(user.username??)">
		</div>
	</div>

 
#if(!(user??))
<div class="form-group row">
		<label class="offset-1 col-2 col-form-label">密码</label>
		<div class="col-8">
			<input type="password" class="form-control" data-rule="required" placeholder="请输入登录密码" data-tips="请输入登录密码" maxlength="20" name="user.password" value="#(user.password??)">
		</div>
	</div>
#end

 
	
	<div class="form-group row">
					<label class="offset-1 col-2 col-form-label" style="width: 100px;">用户角色</label>
					<div class="col-8">
						<select class="form-control"
							data-autoload
							data-select-type="select2"  
							multiple="multiple"
							data-tips="请选择用户角色" 
							data-url="admin/role/select"  
							data-text="=请选择角色[可多选]=" 
							data-value="" 
							data-setvalueto="userRoles"
							data-select="#(user.roles??)">
						</select>
					</div>
	</div>
	<input type="hidden" id="userRoles" name="user.roles" value="#(user.roles??)"/>
	
	</fieldset>
	</form>
	</div>
	<div class="col-4">
	<fieldset class="form-page-fieldset">
	<legend>上传头像</legend>
	<div class="form-group text-center">
			<div class="j_img_uploder" 
			data-url="admin/user/uploadAvatar" 
			data-value="#realImage(user.avatar??)"  
			data-handler="uploadFile"  
			data-hiddeninput="userAvatarInput"  
			data-area="200,200" 
			data-maxsize="2000"></div>
	</div>
	</fieldset>
	</div>
</div>
	


#define js()
<script>

$(function(){
})
</script>
#include("/_view/_admin/common/_formjs.html",formId="userForm")
#end
